/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ticks.chromedome.subsystems;


import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.command.Subsystem;
import ticks.chromedome.RobotMap;
import ticks.chromedome.commands.ActivateStopper;

/**
 *
 * @author Jared
 */
public class Stopper extends Subsystem {
    // Put methods for controlling this subsystem
    // here. Call these from Commands.
    private static Stopper instance = null;
    private Relay stopper;
    
    public static Stopper getInstance(){
        if(instance==null){
            instance = new Stopper();
        }
        return instance;
    }
    private Stopper(){
        stopper = new Relay(RobotMap.STOPPER_RElAY);
        stopper.setDirection(Relay.Direction.kBoth);
    }
    
    public void stopperStop(){
     stopper.set(Relay.Value.kForward);  
}
    
    public void stopperRelease(){
        stopper.set(Relay.Value.kReverse);
    }
    public void initDefaultCommand() {
        setDefaultCommand(new ActivateStopper());
        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
    }
}
